<?php
include('/www/gespro.co.cc/adodb5/adodb.inc.php');
class login {
	function doLogin($user,$pass) {
		include('/www/gespro.co.cc/utils/data.php');
                $query="SELECT * FROM dologin('".$user."','".$pass."')";
                $conn = &ADONewConnection('postgres8');
                $conn->PConnect("host=".$db[host]." user=".$db[user]." password=".$db[pass]." dbname=".$db[db]." ");
                $conn->SetFetchMode(ADODB_FETCH_ASSOC);
                $result = $conn->Execute($query);
                if(!($result)) {
                        $conn->Close();
                        return 0;
                }
                while($row=$result->FetchRow())
                        $group=$row["o_group"];
                $conn->Close();
                return $group;
	}
}

?>
